import request from '@/utils/request'

// 获取工单统计数据
export function getWorkOrderStats () {
    return request({
        url: '/nsk/workOrders/selectgwCountMap',
        method: 'get'
    })
}

// 获取工单列表数据
export function getWorkOrderList (params) {
    return request({
        url: '/nsk/workOrdersAi/getDepartMentWorkOrderslist',
        method: 'get',
        params
    })
}

// 新增工单回复
export function getReplyList ({ orderId, departmentId }) {
    return request({
        url: '/nsk/replyAi/getInfo',
        method: 'get',
        params: { orderId, departmentId }
    });
}

// 导出工单接口
export function exportWorkOrders (params) {
    return request({
        url: '/nsk/workOrdersAi/export?' + new URLSearchParams(params).toString(),
        method: 'post',
        responseType: 'blob'
    })
}

// 获取纪工委统计数据
export function getDWCountMap (params) {
    return request({
        url: '/nsk/workOrdersAi/selectJDCountMap',
        method: 'get',
        params
    })
}
